/*
 * File: FLTM.c
 *
 * Code generated for Simulink model 'FLTM'.
 *
 * Model version                  : 3.723
 * Simulink Coder version         : 9.4 (R2020b) 29-Jul-2020
 * C/C++ source code generated on : Sat Jan  6 08:07:17 2024
 *
 * Target selection: ert.tlc
 * Embedded hardware selection: NXP->Cortex-M4
 * Code generation objective: MISRA C:2012 guidelines
 * Validation result: Not run
 */

#include "FLTM.h"
#include "FLTM_private.h"
#include "RTE.h"

/* Named constants for Chart: '<S22>/HeatVld' */
#define IN_Init_n                      ((uint8_T)1U)
#define IN_Step1                       ((uint8_T)2U)
#define IN_Step2                       ((uint8_T)3U)

/* Named constants for Chart: '<S27>/TmpUp' */
#define IN_Init_fg                     ((uint8_T)1U)
#define IN_Step                        ((uint8_T)2U)

/* Named constants for Chart: '<S6>/FltLevelDeal2' */
#define IN_FltValDeal1                 ((uint8_T)1U)
#define IN_FltValDeal2                 ((uint8_T)2U)
#define IN_Init_k                      ((uint8_T)3U)

/* Named constants for Chart: '<S37>/MaiRlyAdh' */
#define IN_RlyAdhCheck                 ((uint8_T)1U)
#define IN_RlyAdhCheck1                ((uint8_T)2U)
#define IN_RlyInit                     ((uint8_T)3U)

/* Named constants for Chart: '<S37>/PtcRlyAdh' */
#define IN_RlyAdhCheck_b               ((uint8_T)1U)
#define IN_RlyInit_i                   ((uint8_T)2U)

/* Block signals (default storage) */
B_FLTM_T FLTM_B;

/* Block states (default storage) */
DW_FLTM_T FLTM_DW;

/* Real-time model */
static RT_MODEL_FLTM_T FLTM_M_;
RT_MODEL_FLTM_T *const FLTM_M = &FLTM_M_;

/* Exported data definition */

/* Definition for custom storage class: ExportToFile */
uint8_T fltm_enum_BMSHwCircuit = ((uint8_T)0U);/* '<S55>/Data Type Conversion1' */
uint8_T fltm_enum_BackOC = ((uint8_T)0U);/* '<S139>/Data Type Conversion1' */
uint8_T fltm_enum_CANBusOff = ((uint8_T)0U);/* '<S103>/Data Type Conversion1' */
uint8_T fltm_enum_CellTmpRiseFastFlt = ((uint8_T)0U);/* '<S6>/Constant17' */
uint8_T fltm_enum_CellTmpSmpFlt = ((uint8_T)0U);/* '<S239>/Data Type Conversion1' */
uint8_T fltm_enum_CellVolSmpFlt = ((uint8_T)0U);/* '<S240>/Data Type Conversion1' */
uint8_T fltm_enum_CellVoltLimUV = ((uint8_T)0U);/* synthesized block */
uint8_T fltm_enum_ChargerReadyOverTime = ((uint8_T)0U);/* synthesized block */
uint8_T fltm_enum_ChgOC = ((uint8_T)0U);/* '<S140>/Data Type Conversion1' */
uint8_T fltm_enum_CurrSmpAbnl = ((uint8_T)0U);/* '<S241>/Data Type Conversion1' */
uint8_T fltm_enum_DsgOC = ((uint8_T)0U);/* '<S141>/Data Type Conversion1' */
uint8_T fltm_enum_FastChgProtectSts = ((uint8_T)0U);/* synthesized block */
uint8_T fltm_enum_InsCircuitChk = ((uint8_T)0U);/* synthesized block */
uint8_T fltm_enum_PTCHeatInvalid = ((uint8_T)0U);/* '<S217>/Data Type Conversion1' */
uint8_T fltm_enum_PTCRlyOp = ((uint8_T)0U);/* synthesized block */
uint8_T fltm_enum_PackVolSmpFlt = ((uint8_T)0U);/* '<S6>/FLTM_SMP' */
uint8_T fltm_enum_PreFail = ((uint8_T)0U);/* '<S222>/Data Type Conversion1' */
uint8_T fltm_enum_SelfChkSts = ((uint8_T)0U);/* '<S6>/FltLevelDeal2' */
uint8_T fltm_enum_SmpChipSpiChk = ((uint8_T)0U);/* synthesized block */
uint8_T fltm_enum_ThermRunaway = ((uint8_T)0U);/* '<S291>/Data Type Conversion1' */
uint8_T fltm_enum_adhChkSts = ((uint8_T)0U);/* '<S37>/Data Type Conversion' */
uint8_T fltm_enum_bmuComFlt = ((uint8_T)0U);/* synthesized block */
uint8_T fltm_enum_cellDiffTmpFlt = ((uint8_T)0U);/* '<S347>/Data Type Conversion1' */
uint8_T fltm_enum_cellDiffVolFlt = ((uint8_T)0U);/* '<S460>/Data Type Conversion1' */
uint8_T fltm_enum_cellOTChgFlt = ((uint8_T)0U);/* '<S344>/Data Type Conversion1' */
uint8_T fltm_enum_cellOTFlt = ((uint8_T)0U);/* '<S346>/Data Type Conversion1' */
uint8_T fltm_enum_cellOVFlt = ((uint8_T)0U);/* '<S462>/Data Type Conversion1' */
uint8_T fltm_enum_cellUTChgFlt = ((uint8_T)0U);/* '<S6>/FLT_CELLTmp' */
uint8_T fltm_enum_cellUTFlt = ((uint8_T)0U);/* '<S345>/Data Type Conversion1' */
uint8_T fltm_enum_cellUVFlt = ((uint8_T)0U);/* '<S461>/Data Type Conversion1' */
uint8_T fltm_enum_chgNegRlyAd = ((uint8_T)0U);/* '<S6>/RLY_AD' */
uint8_T fltm_enum_chgPlugOT = ((uint8_T)0U);/* '<S78>/Data Type Conversion1' */
uint8_T fltm_enum_chgPlugSmpFlt = ((uint8_T)0U);/* '<S79>/Data Type Conversion1' */
uint8_T fltm_enum_chgPosRlyAd = ((uint8_T)0U);/* '<S6>/RLY_AD' */
uint8_T fltm_enum_heatOTFlt = ((uint8_T)0U);/* '<S77>/Data Type Conversion1' */
uint8_T fltm_enum_hvilFlt = ((uint8_T)0U);/* '<S179>/Data Type Conversion1' */
uint8_T fltm_enum_insuU = ((uint8_T)0U);/* '<S196>/Data Type Conversion1' */
uint8_T fltm_enum_negRlyAd = ((uint8_T)0U);/* '<S6>/RLY_AD' */
uint8_T fltm_enum_negRlyOp = ((uint8_T)0U);/* synthesized block */
uint8_T fltm_enum_obcComFlt = ((uint8_T)0U);/* '<S212>/Data Type Conversion1' */
uint8_T fltm_enum_packFuseFlt = ((uint8_T)0U);/* synthesized block */
uint8_T fltm_enum_packOVFlt = ((uint8_T)0U);/* '<S558>/Data Type Conversion1' */
uint8_T fltm_enum_packUVFlt = ((uint8_T)0U);/* '<S559>/Data Type Conversion1' */
uint8_T fltm_enum_posRlyAd = ((uint8_T)0U);/* '<S586>/Data Type Conversion1' */
uint8_T fltm_enum_posRlyOp = ((uint8_T)0U);/* synthesized block */
uint8_T fltm_enum_posRlyPwrDownAd = ((uint8_T)0U);/* '<S6>/Constant6' */
uint8_T fltm_enum_posRlyhighVolSmpAbnl = ((uint8_T)0U);/* synthesized block */
uint8_T fltm_enum_preRlyAd = ((uint8_T)0U);/* '<S588>/Data Type Conversion1' */
uint8_T fltm_enum_ptcAdFlt = ((uint8_T)0U);/* '<S587>/Data Type Conversion1' */
uint8_T fltm_enum_qchgComFlt = ((uint8_T)0U);/* synthesized block */
uint8_T fltm_enum_qchgRlyOp = ((uint8_T)0U);/* synthesized block */
uint8_T fltm_enum_schgccFlt = ((uint8_T)0U);/* synthesized block */
uint8_T fltm_enum_schgcpFlt = ((uint8_T)0U);/* synthesized block */
uint8_T fltm_enum_socJump = ((uint8_T)0U);/* '<S266>/Data Type Conversion1' */
uint8_T fltm_enum_socO = ((uint8_T)0U);/* '<S6>/FLTM_SOC' */
uint8_T fltm_enum_socU = ((uint8_T)0U);/* '<S265>/Data Type Conversion1' */
uint8_T fltm_enum_sohU = ((uint8_T)0U);/* '<S283>/Data Type Conversion1' */
uint8_T fltm_enum_v12Flt = ((uint8_T)0U);/* '<S46>/Data Type Conversion1' */
uint8_T fltm_enum_v12UL = ((uint8_T)0U);/* '<S6>/FLTM_12VErr' */
uint8_T fltm_enum_vcuComFlt = ((uint8_T)0U);/* '<S301>/Data Type Conversion1' */
boolean_T fltm_flg_hvilFlt = false;    /* '<S19>/Data Type Conversion' */

/* Forward declaration for local functions */
static void inner_default_Step(boolean_T *FltFlg);

/* Output and update for atomic system: '<S6>/FLTM_12VErr' */
void FLTM_12VErr(void)
{
    boolean_T outflg;
    outflg = false;
    if (FLTM_DW.cnt_g >= 200)
    {
        FLTM_DW.cnt_g = 200U;
        outflg = true;
    }
    else
    {
        FLTM_DW.cnt_g++;
    }

    DelayTimesForC(((Rte_mv_SplyPwrVolt_GetVal() >= 16000) && outflg) ||
                   ((Rte_mv_SplyPwrVolt_GetVal() <= 9000) && outflg),
                   &FLTM_B.DelayTimesForC_b, &FLTM_DW.DelayTimesForC_b, 0U, 2000,
                   &FLTM_DW.ClearFault, &FLTM_DW.sysRunTime);
    DelayTimesForC((Rte_mv_SplyPwrVolt_GetVal() <= 15500) && outflg &&
                   ((Rte_mv_SplyPwrVolt_GetVal() >= 9500) && outflg),
                   &FLTM_B.DelayTimesForC1, &FLTM_DW.DelayTimesForC1, 0U, 100,
                   &FLTM_DW.ClearFault, &FLTM_DW.sysRunTime);
    FltLevelSettingT(FLTM_ConstB.DataTypeConversion_a,
                     FLTM_ConstB.DataTypeConversion2_an,
                     FLTM_ConstB.DataTypeConversion3_h5,
                     FLTM_ConstB.DataTypeConversion4_du,
                     FLTM_B.DelayTimesForC1.Compare_ihh3,
                     FLTM_B.DelayTimesForC_b.Compare_ihh3,
                     &FLTM_B.sf_FetLevelSet, &FLTM_DW.sf_FetLevelSet, 1);
    fltm_enum_v12Flt = FLTM_B.sf_FetLevelSet.ScFlt_LV;
}

/* Output and update for atomic system: '<S6>/FLTM_BMSHwCircuit' */
void FLTM_BMSHwCircuit(void)
{
    boolean_T outflg;
    outflg = false;
    if (FLTM_DW.cnt_p >= 300)
    {
        FLTM_DW.cnt_p = 300U;
        outflg = true;
    }
    else
    {
        FLTM_DW.cnt_p++;
    }

    DelayTimesForC(Rte_flg_SmpChipSpiFlt_GetVal() && outflg,
                   &FLTM_B.DelayTimesForC_bj, &FLTM_DW.DelayTimesForC_bj, 0U,
                   300, &FLTM_DW.ClearFault, &FLTM_DW.sysRunTime);
    FltLevelSettingFT(FLTM_B.DelayTimesForC_bj.Compare_ihh3,
                      FLTM_ConstB.DataTypeConversion2_ae,
                      &FLTM_B.sf_FetLevelSetFT_fzi,
                      &FLTM_DW.sf_FetLevelSetFT_fzi, 3, 1, &FLTM_DW.ClearFault);
    fltm_enum_BMSHwCircuit = FLTM_B.sf_FetLevelSetFT_fzi.ScFlt_LV;
}

/* Output and update for atomic system: '<S16>/PtcHeatTemp' */
void PtcHeatTemp(void)
{
    if (FLTM_B.LogicalOperator17_i && FLTM_B.LogicalOperator9_j)
    {
        FLTM_B.resTmp = 65U;
    }
    else if (FLTM_B.LogicalOperator17_i)
    {
        FLTM_B.resTmp = Rte_enum_HeatTmp2_GetVal();
    }
    else if (FLTM_B.LogicalOperator9_j)
    {
        FLTM_B.resTmp = Rte_enum_HeatTmp1_GetVal();
    }
    else if (Rte_enum_HeatTmp2_GetVal() > Rte_enum_HeatTmp1_GetVal())
    {
        FLTM_B.resTmp = Rte_enum_HeatTmp2_GetVal();
    }
    else
    {
        FLTM_B.resTmp = Rte_enum_HeatTmp1_GetVal();
    }
}

/* Output and update for atomic system: '<S6>/FLTM_BMUTMPSP1' */
void FLTM_BMUTMPSP1(void)
{
    uint8_T tmp;
    DelayTimesForC(((Rte_enum_chgPulgTmp1_GetVal() <= 10) ||
                    (Rte_enum_chgPulgTmp1_GetVal() > 165) ||
                    ((Rte_enum_chgPulgTmp2_GetVal() <= 10) ||
                     (Rte_enum_chgPulgTmp2_GetVal() > 165))) &&
                   FLTM_ConstB.Compare_dsv, &FLTM_B.DelayTimesForC4,
                   &FLTM_DW.DelayTimesForC4, 0U, 500, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    FltLevelSettingFT(FLTM_B.DelayTimesForC4.Compare_ihh3,
                      FLTM_ConstB.DataTypeConversion2_d4,
                      &FLTM_B.sf_FetLevelSetFT_fzicy,
                      &FLTM_DW.sf_FetLevelSetFT_fzicy, 3, 1, &FLTM_DW.ClearFault);
    fltm_enum_chgPlugSmpFlt = FLTM_B.sf_FetLevelSetFT_fzicy.ScFlt_LV;
    if (Rte_enum_chgPulgTmp1_GetVal() > Rte_enum_chgPulgTmp2_GetVal())
    {
        tmp = Rte_enum_chgPulgTmp1_GetVal();
    }
    else
    {
        tmp = Rte_enum_chgPulgTmp2_GetVal();
    }

    DelayTimesForC((tmp >= 100) && (fltm_enum_chgPlugSmpFlt == 0),
                   &FLTM_B.DelayTimesForC1_b, &FLTM_DW.DelayTimesForC1_b, 0U,
                   300, &FLTM_DW.ClearFault, &FLTM_DW.sysRunTime);
    FltLevelSettingFT(FLTM_B.DelayTimesForC1_b.Compare_ihh3,
                      FLTM_ConstB.DataTypeConversion2_fj,
                      &FLTM_B.sf_FetLevelSetFT_fzic,
                      &FLTM_DW.sf_FetLevelSetFT_fzic, 3, 1, &FLTM_DW.ClearFault);
    fltm_enum_chgPlugOT = FLTM_B.sf_FetLevelSetFT_fzic.ScFlt_LV;
    FLTM_B.LogicalOperator17_i = ((Rte_enum_HeatTmp1_GetVal() <= 10) ||
        (Rte_enum_HeatTmp1_GetVal() > 165));
    FLTM_B.LogicalOperator9_j = ((Rte_enum_HeatTmp2_GetVal() <= 10) ||
        (Rte_enum_HeatTmp2_GetVal() > 165));
    PtcHeatTemp();
    DelayTimesForC(FLTM_B.resTmp < 115, &FLTM_B.DelayTimesForC2,
                   &FLTM_DW.DelayTimesForC2, 0U, 1000, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    DelayTimesForC((FLTM_B.resTmp >= 110) && FLTM_B.LogicalOperator1_j,
                   &FLTM_B.DelayTimesForC5, &FLTM_DW.DelayTimesForC5, 0U, 1000,
                   &FLTM_DW.ClearFault, &FLTM_DW.sysRunTime);
    DelayTimesForC(FLTM_B.resTmp < 105, &FLTM_B.DelayTimesForC6,
                   &FLTM_DW.DelayTimesForC6, 0U, 1000, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    DelayTimesForC(FLTM_B.resTmp < 110, &FLTM_B.DelayTimesForC7,
                   &FLTM_DW.DelayTimesForC7, 0U, 1000, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    DelayTimesForC((FLTM_B.resTmp >= 115) && FLTM_B.LogicalOperator1_j,
                   &FLTM_B.DelayTimesForC8, &FLTM_DW.DelayTimesForC8, 0U, 500,
                   &FLTM_DW.ClearFault, &FLTM_DW.sysRunTime);
    DelayTimesForC((FLTM_B.resTmp >= 120) && FLTM_B.LogicalOperator1_j,
                   &FLTM_B.DelayTimesForC9, &FLTM_DW.DelayTimesForC9, 0U, 300,
                   &FLTM_DW.ClearFault, &FLTM_DW.sysRunTime);
    FltLevelSettingCT(FLTM_B.DelayTimesForC5.Compare_ihh3,
                      FLTM_B.DelayTimesForC6.Compare_ihh3,
                      FLTM_B.DelayTimesForC8.Compare_ihh3,
                      FLTM_B.DelayTimesForC7.Compare_ihh3,
                      FLTM_B.DelayTimesForC9.Compare_ihh3,
                      FLTM_B.DelayTimesForC2.Compare_ihh3,
                      &FLTM_B.sf_FetLevelSetCT, &FLTM_DW.sf_FetLevelSetCT, 1,
                      &FLTM_DW.ClearFault);
    fltm_enum_heatOTFlt = FLTM_B.sf_FetLevelSetCT.ScFlt_LV;
}

/* Output and update for atomic system: '<S6>/FLTM_CANBUSOFF' */
void FLTM_CANBUSOFF(void)
{
    DelayTimesForC(Rte_flg_CANBusOff_GetVal(), &FLTM_B.DelayTimesForC_bj4,
                   &FLTM_DW.DelayTimesForC_bj4, 0U, 10, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    DelayTimesForC(!Rte_flg_CANBusOff_GetVal(), &FLTM_B.DelayTimesForC1_bj,
                   &FLTM_DW.DelayTimesForC1_bj, 0U, 100, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    FltLevelSettingT(FLTM_B.DelayTimesForC1_bj.Compare_ihh3,
                     FLTM_B.DelayTimesForC_bj4.Compare_ihh3,
                     FLTM_ConstB.DataTypeConversion3_h,
                     FLTM_ConstB.DataTypeConversion4_f5,
                     FLTM_ConstB.DataTypeConversion5_dd,
                     FLTM_ConstB.DataTypeConversion6_n, &FLTM_B.sf_FetLevelSet_d,
                     &FLTM_DW.sf_FetLevelSet_d, 1);
    fltm_enum_CANBusOff = FLTM_B.sf_FetLevelSet_d.ScFlt_LV;
}

/* Output and update for atomic system: '<S6>/FLTM_CURR' */
void FLTM_CURR(void)
{
    int32_T Product31;
    int16_T Product29;
    int16_T Product30;
    int16_T Product7;
    boolean_T Compare_al;
    boolean_T LogicalOperator8_b;
    Product30 = (int16_T)(sopv_ma_BackPulse / 10U);
    Product29 = (int16_T)(sopv_ma_DsgPulse / 10U);
    Product7 = (int16_T)(sopv_ma_ChgReqCur / 10U);
    Compare_al = (vewm_enum_workingMode == ((uint8_T)Pdcfg_WmDsging));
    Product31 = FLTM_B.Saturation1 * 100;
    DelayTimesForC(Product31 < Product29 * 100, &FLTM_B.DelayTimesForC1_bj4,
                   &FLTM_DW.DelayTimesForC1_bj4, 0U, 1000, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    DelayTimesForC(FLTM_B.Saturation1 > -Product7, &FLTM_B.DelayTimesForC10,
                   &FLTM_DW.DelayTimesForC10, 0U, 1000, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    LogicalOperator8_b = ((vewm_enum_workingMode == ((uint8_T)Pdcfg_WmSChging)) ||
                          (vewm_enum_workingMode == ((uint8_T)Pdcfg_WmQChging)));
    DelayTimesForC((fltm_enum_CurrSmpAbnl == 0) && LogicalOperator8_b &&
                   (Product31 <= Product7 * -110) && (Product31 <= Product7 *
                    -100 + -1000), &FLTM_B.DelayTimesForC11,
                   &FLTM_DW.DelayTimesForC11, 0U, 500, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    DelayTimesForC((fltm_enum_CurrSmpAbnl == 0) && LogicalOperator8_b &&
                   (Product31 <= Product7 * -105) && (Product31 <= Product7 *
                    -100 + -500), &FLTM_B.DelayTimesForC12,
                   &FLTM_DW.DelayTimesForC12, 0U, 1000, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    DelayTimesForC((Product31 > (int16_T)(-107 * Product7)) ||
                   (FLTM_B.Saturation1 >= -(Product7 + 8)),
                   &FLTM_B.DelayTimesForC13, &FLTM_DW.DelayTimesForC13, 0U, 1000,
                   &FLTM_DW.ClearFault, &FLTM_DW.sysRunTime);
    DelayTimesForC(LogicalOperator8_b && (Product31 <= Product7 * -120) &&
                   (Product31 <= Product7 * -100 + -1500) &&
                   (fltm_enum_CurrSmpAbnl == 0), &FLTM_B.DelayTimesForC14,
                   &FLTM_DW.DelayTimesForC14, 0U, 300, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    DelayTimesForC(Compare_al && (Product31 >= Product29 * 110 + 1000) &&
                   (Product31 != 0) && (fltm_enum_CurrSmpAbnl == 0),
                   &FLTM_B.DelayTimesForC2_b, &FLTM_DW.DelayTimesForC2_b, 0U,
                   500, &FLTM_DW.ClearFault, &FLTM_DW.sysRunTime);
    DelayTimesForC(Compare_al && (Product31 >= Product29 * 105 + 500) &&
                   (Product31 != 0) && (fltm_enum_CurrSmpAbnl == 0),
                   &FLTM_B.DelayTimesForC20, &FLTM_DW.DelayTimesForC20, 0U, 1000,
                   &FLTM_DW.ClearFault, &FLTM_DW.sysRunTime);
    DelayTimesForC(Product31 < Product29 * 105, &FLTM_B.DelayTimesForC3_b,
                   &FLTM_DW.DelayTimesForC3_b, 0U, 1000, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    DelayTimesForC(Compare_al && (Product31 >= Product29 * 120 + 1500) &&
                   (Product31 != 0) && (fltm_enum_CurrSmpAbnl == 0),
                   &FLTM_B.DelayTimesForC4_b, &FLTM_DW.DelayTimesForC4_b, 0U,
                   300, &FLTM_DW.ClearFault, &FLTM_DW.sysRunTime);
    DelayTimesForC(FLTM_B.Saturation1 > -Product30, &FLTM_B.DelayTimesForC5_b,
                   &FLTM_DW.DelayTimesForC5_b, 0U, 1000, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    DelayTimesForC((fltm_enum_CurrSmpAbnl == 0) && Compare_al && (Product31 <=
                    Product30 * -110) && (Product31 <= Product30 * -100 + -1000),
                   &FLTM_B.DelayTimesForC6_b, &FLTM_DW.DelayTimesForC6_b, 0U,
                   500, &FLTM_DW.ClearFault, &FLTM_DW.sysRunTime);
    DelayTimesForC((fltm_enum_CurrSmpAbnl == 0) && Compare_al && (Product31 <=
                    Product30 * -105) && (Product31 <= Product30 * -100 + -500),
                   &FLTM_B.DelayTimesForC7_b, &FLTM_DW.DelayTimesForC7_b, 0U,
                   1000, &FLTM_DW.ClearFault, &FLTM_DW.sysRunTime);
    DelayTimesForC(Product31 > (int16_T)(-107 * Product30),
                   &FLTM_B.DelayTimesForC8_b, &FLTM_DW.DelayTimesForC8_b, 0U,
                   1000, &FLTM_DW.ClearFault, &FLTM_DW.sysRunTime);
    DelayTimesForC(Compare_al && (Product31 <= Product30 * -120) && (Product31 <=
                    Product30 * -100 + -1500) && (fltm_enum_CurrSmpAbnl == 0),
                   &FLTM_B.DelayTimesForC9_b, &FLTM_DW.DelayTimesForC9_b, 0U,
                   300, &FLTM_DW.ClearFault, &FLTM_DW.sysRunTime);
    FltLevelSettingCT(FLTM_B.DelayTimesForC7_b.Compare_ihh3,
                      FLTM_B.DelayTimesForC5_b.Compare_ihh3,
                      FLTM_B.DelayTimesForC6_b.Compare_ihh3,
                      FLTM_B.DelayTimesForC8_b.Compare_ihh3,
                      FLTM_B.DelayTimesForC9_b.Compare_ihh3,
                      FLTM_ConstB.DataTypeConversion6_j3,
                      &FLTM_B.sf_FetLevelSetCT_o, &FLTM_DW.sf_FetLevelSetCT_o, 1,
                      &FLTM_DW.ClearFault);
    fltm_enum_BackOC = FLTM_B.sf_FetLevelSetCT_o.ScFlt_LV;
    FltLevelSettingCT(FLTM_B.DelayTimesForC12.Compare_ihh3,
                      FLTM_B.DelayTimesForC10.Compare_ihh3,
                      FLTM_B.DelayTimesForC11.Compare_ihh3,
                      FLTM_B.DelayTimesForC13.Compare_ihh3,
                      FLTM_B.DelayTimesForC14.Compare_ihh3,
                      FLTM_ConstB.DataTypeConversion6_d,
                      &FLTM_B.sf_FetLevelSetCT_ok, &FLTM_DW.sf_FetLevelSetCT_ok,
                      1, &FLTM_DW.ClearFault);
    fltm_enum_ChgOC = FLTM_B.sf_FetLevelSetCT_ok.ScFlt_LV;
    FltLevelSettingCT(FLTM_B.DelayTimesForC20.Compare_ihh3,
                      FLTM_B.DelayTimesForC1_bj4.Compare_ihh3,
                      FLTM_B.DelayTimesForC2_b.Compare_ihh3,
                      FLTM_B.DelayTimesForC3_b.Compare_ihh3,
                      FLTM_B.DelayTimesForC4_b.Compare_ihh3,
                      FLTM_ConstB.DataTypeConversion6_o1,
                      &FLTM_B.sf_FetLevelSetCT_oku,
                      &FLTM_DW.sf_FetLevelSetCT_oku, 1, &FLTM_DW.ClearFault);
    fltm_enum_DsgOC = FLTM_B.sf_FetLevelSetCT_oku.ScFlt_LV;
}

/* Output and update for atomic system: '<S6>/FLTM_HVIL' */
void FLTM_HVIL(void)
{
    boolean_T Compare_gr;
    Compare_gr = !Rte_flg_hvil1Sts_GetVal();
    DelayTimesForC(Compare_gr, &FLTM_B.DelayTimesForC1_bj4o,
                   &FLTM_DW.DelayTimesForC1_bj4o, 0U, 5, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    fltm_flg_hvilFlt = FLTM_B.DelayTimesForC1_bj4o.Compare_ihh3;
    DelayTimesForC(Compare_gr, &FLTM_B.DelayTimesForC12_b,
                   &FLTM_DW.DelayTimesForC12_b, 0U, 300, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    FltLevelSettingFT(FLTM_B.DelayTimesForC12_b.Compare_ihh3,
                      FLTM_ConstB.DataTypeConversion2_mf,
                      &FLTM_B.sf_FetLevelSetFT_fzicyd,
                      &FLTM_DW.sf_FetLevelSetFT_fzicyd, 3, 1,
                      &FLTM_DW.ClearFault);
    fltm_enum_hvilFlt = FLTM_B.sf_FetLevelSetFT_fzicyd.ScFlt_LV;
}

/* Output and update for atomic system: '<S6>/FLTM_INSU' */
void FLTM_INSU(void)
{
    uint32_T Switch;
    boolean_T outflg;
    if (FLTM_B.Product30_g >= 50)
    {
        Switch = FLTM_B.Product30_g == 0U ? MAX_uint32_T : (uint32_T)
            (Rte_kohm_InsRes_GetVal() * 1000) / FLTM_B.Product30_g;
    }
    else
    {
        Switch = 50000U;
    }

    outflg = false;
    if (FLTM_DW.cnt_k >= 350)
    {
        FLTM_DW.cnt_k = 350U;
        outflg = true;
    }
    else
    {
        FLTM_DW.cnt_k++;
    }

    DelayTimesForC((Switch <= 500U) && outflg, &FLTM_B.DelayTimesForC1_bj4os,
                   &FLTM_DW.DelayTimesForC1_bj4os, 0U, 2000, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    DelayTimesForC(Switch > 600U, &FLTM_B.DelayTimesForC2_bj,
                   &FLTM_DW.DelayTimesForC2_bj, 0U, 1000, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    DelayTimesForC(Switch > 350U, &FLTM_B.DelayTimesForC3_bj,
                   &FLTM_DW.DelayTimesForC3_bj, 0U, 1000, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    DelayTimesForC((Switch <= 250U) && outflg, &FLTM_B.DelayTimesForC4_bj,
                   &FLTM_DW.DelayTimesForC4_bj, 0U, 2000, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    DelayTimesForC((Switch <= 100U) && outflg, &FLTM_B.DelayTimesForC5_bj,
                   &FLTM_DW.DelayTimesForC5_bj, 0U, 2000, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    FltLevelSettingCT(FLTM_B.DelayTimesForC1_bj4os.Compare_ihh3,
                      FLTM_B.DelayTimesForC2_bj.Compare_ihh3,
                      FLTM_B.DelayTimesForC4_bj.Compare_ihh3,
                      FLTM_B.DelayTimesForC3_bj.Compare_ihh3,
                      FLTM_B.DelayTimesForC5_bj.Compare_ihh3,
                      FLTM_ConstB.DataTypeConversion6_he,
                      &FLTM_B.sf_FetLevelSetCT_okug,
                      &FLTM_DW.sf_FetLevelSetCT_okug, 1, &FLTM_DW.ClearFault);
    fltm_enum_insuU = FLTM_B.sf_FetLevelSetCT_okug.ScFlt_LV;
}

/* Output and update for atomic system: '<S6>/FLTM_OBCCOM' */
void FLTM_OBCCOM(void)
{
    int_T idxDelay;
    boolean_T LogicalOperator_k;
    LogicalOperator_k = ((Rte_vcan_obcLifeCnt1_GetVal() ==
                          FLTM_DW.Delay_DSTATE_h[0]) &&
                         FLTM_B.LogicalOperator1_j);
    DelayTimesForC(LogicalOperator_k, &FLTM_B.DelayTimesForC12_bj,
                   &FLTM_DW.DelayTimesForC12_bj, 0U, 500, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    FltLevelSettingFT(FLTM_B.DelayTimesForC12_bj.Compare_ihh3,
                      !LogicalOperator_k, &FLTM_B.sf_FetLevelSetFT_fzicydy,
                      &FLTM_DW.sf_FetLevelSetFT_fzicydy, 1, 1,
                      &FLTM_DW.ClearFault);
    fltm_enum_obcComFlt = FLTM_B.sf_FetLevelSetFT_fzicydy.ScFlt_LV;
    for (idxDelay = 0; idxDelay < 10; idxDelay++)
    {
        FLTM_DW.Delay_DSTATE_h[idxDelay] = FLTM_DW.Delay_DSTATE_h[idxDelay + 1];
    }

    FLTM_DW.Delay_DSTATE_h[10] = Rte_vcan_obcLifeCnt1_GetVal();
}

/* Output and update for atomic system: '<S22>/HeatVld' */
void HeatVld(void)
{
    if (FLTM_DW.is_active_c21_FLTM == 0U)
    {
        FLTM_DW.is_active_c21_FLTM = 1U;
        FLTM_DW.is_c21_FLTM = IN_Init_n;
        FLTM_DW.cnt_f = 0U;
        FLTM_B.Enable = false;
    }
    else
    {
        switch (FLTM_DW.is_c21_FLTM)
        {
          case IN_Init_n:
            if ((tmsc_enum_HeatSts == 2) || (tmsc_enum_HeatSts == 3))
            {
                FLTM_DW.is_c21_FLTM = IN_Step1;
                FLTM_DW.TempLast = Rte_c_CellMinTmp_GetVal();
                FLTM_DW.cnt_f = 0U;
            }
            break;

          case IN_Step1:
            if ((tmsc_enum_HeatSts != 2) && (tmsc_enum_HeatSts != 3))
            {
                FLTM_DW.is_c21_FLTM = IN_Init_n;
                FLTM_DW.cnt_f = 0U;
                FLTM_B.Enable = false;
            }
            else if ((Rte_c_CellMinTmp_GetVal() <= FLTM_DW.TempLast + 2) &&
                     (FLTM_DW.cnt_f >= 360000U))
            {
                FLTM_DW.is_c21_FLTM = IN_Step2;
                FLTM_B.Enable = true;
            }
            else if (Rte_c_CellMinTmp_GetVal() > FLTM_DW.TempLast + 2)
            {
                FLTM_DW.is_c21_FLTM = IN_Step1;
                FLTM_DW.TempLast = Rte_c_CellMinTmp_GetVal();
                FLTM_DW.cnt_f = 0U;
            }
            else
            {
                FLTM_DW.cnt_f++;
            }
            break;

          default:
            /* case IN_Step2: */
            break;
        }
    }
}

/* Output and update for atomic system: '<S6>/FLTM_PTCHeatInvalid' */
void FLTM_PTCHeatInvalid(void)
{
    HeatVld();
    FltLevelSettingT(FLTM_ConstB.DataTypeConversion_fj,
                     FLTM_ConstB.DataTypeConversion2_f,
                     FLTM_ConstB.DataTypeConversion3_f, FLTM_B.Enable,
                     FLTM_ConstB.DataTypeConversion5_c,
                     FLTM_ConstB.DataTypeConversion6_gn,
                     &FLTM_B.sf_FetLevelSet_dm, &FLTM_DW.sf_FetLevelSet_dm, 1);
    fltm_enum_PTCHeatInvalid = FLTM_B.sf_FetLevelSet_dm.ScFlt_LV;
}

/* Output and update for atomic system: '<S6>/FLTM_PreFail' */
void FLTM_PreFail(void)
{
    DelayTimesForC(vewm_enum_PrechrgSts == 3, &FLTM_B.DelayTimesForC4_bj4,
                   &FLTM_DW.DelayTimesForC4_bj4, 0U, 10, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    FltLevelSettingFT(FLTM_B.DelayTimesForC4_bj4.Compare_ihh3,
                      FLTM_ConstB.DataTypeConversion2_jy,
                      &FLTM_B.sf_FetLevelSetFT_fzicydy1,
                      &FLTM_DW.sf_FetLevelSetFT_fzicydy1, 3, 1,
                      &FLTM_DW.ClearFault);
    fltm_enum_PreFail = FLTM_B.sf_FetLevelSetFT_fzicydy1.ScFlt_LV;
}

/* Output and update for atomic system: '<S6>/FLTM_SMP' */
void FLTM_SMP(void)
{
    DelayTimesForC((Rte_enum_cellTempSmp_GetVal() >= 1) ||
                   (Rte_c_CellMaxTmp_GetVal() >= 140) ||
                   (Rte_c_CellMinTmp_GetVal() <= 0),
                   &FLTM_B.DelayTimesForC12_bj4, &FLTM_DW.DelayTimesForC12_bj4,
                   0U, 300, &FLTM_DW.ClearFault, &FLTM_DW.sysRunTime);
    DelayTimesForC((Rte_enum_cellTempSmp_GetVal() == 0) &&
                   (Rte_c_CellMaxTmp_GetVal() < 140) && (Rte_c_CellMinTmp_GetVal
                    () > 0), &FLTM_B.DelayTimesForC4_bj4o,
                   &FLTM_DW.DelayTimesForC4_bj4o, 0U, 1000, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    FltLevelSettingFT(FLTM_B.DelayTimesForC12_bj4.Compare_ihh3,
                      FLTM_B.DelayTimesForC4_bj4o.Compare_ihh3,
                      &FLTM_B.sf_FetLevelSetFT_fzicydy1c,
                      &FLTM_DW.sf_FetLevelSetFT_fzicydy1c, 3, 1,
                      &FLTM_DW.ClearFault);
    fltm_enum_CellTmpSmpFlt = FLTM_B.sf_FetLevelSetFT_fzicydy1c.ScFlt_LV;
    DelayTimesForC((Rte_enum_cellVoltSmp_GetVal() >= 1) ||
                   (Rte_mv_CellMaxVol_GetVal() >= 3950) ||
                   (Rte_mv_CellMinVol_GetVal() < 500),
                   &FLTM_B.DelayTimesForC1_bj4osu,
                   &FLTM_DW.DelayTimesForC1_bj4osu, 0U, 300, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    FltLevelSettingFT(FLTM_B.DelayTimesForC1_bj4osu.Compare_ihh3,
                      FLTM_ConstB.DataTypeConversion2_jb,
                      &FLTM_B.sf_FetLevelSetFT_fzicydy1ce,
                      &FLTM_DW.sf_FetLevelSetFT_fzicydy1ce, 3, 1,
                      &FLTM_DW.ClearFault);
    fltm_enum_CellVolSmpFlt = FLTM_B.sf_FetLevelSetFT_fzicydy1ce.ScFlt_LV;
    DelayTimesForC(FLTM_B.Product30_p > 400, &FLTM_B.DelayTimesForC3_bj4,
                   &FLTM_DW.DelayTimesForC3_bj4, 0U, 300, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    FltLevelSettingFT(FLTM_B.DelayTimesForC3_bj4.Compare_ihh3,
                      FLTM_ConstB.DataTypeConversion2_o0,
                      &FLTM_B.sf_FetLevelSetFT_fzicydy1cex,
                      &FLTM_DW.sf_FetLevelSetFT_fzicydy1cex, 3, 1,
                      &FLTM_DW.ClearFault);
    fltm_enum_CurrSmpAbnl = FLTM_B.sf_FetLevelSetFT_fzicydy1cex.ScFlt_LV;
}

/* Output and update for atomic system: '<S6>/FLTM_SOC' */
void FLTM_SOC(void)
{
    int_T idxDelay;
    int16_T Abs;
    DelayTimesForC(soce_pct_DispSOC <= 2000, &FLTM_B.DelayTimesForC1_bj4osu1,
                   &FLTM_DW.DelayTimesForC1_bj4osu1, 0U, 1000,
                   &FLTM_DW.ClearFault, &FLTM_DW.sysRunTime);
    DelayTimesForC(soce_pct_DispSOC > 2100, &FLTM_B.DelayTimesForC2_bj4,
                   &FLTM_DW.DelayTimesForC2_bj4, 0U, 1000, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    DelayTimesForC(soce_pct_DispSOC <= 1000, &FLTM_B.DelayTimesForC3_bj4o,
                   &FLTM_DW.DelayTimesForC3_bj4o, 0U, 500, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    DelayTimesForC(soce_pct_DispSOC > 1100, &FLTM_B.DelayTimesForC4_bj4os,
                   &FLTM_DW.DelayTimesForC4_bj4os, 0U, 1000, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    FltLevelSettingCT(FLTM_B.DelayTimesForC1_bj4osu1.Compare_ihh3,
                      FLTM_B.DelayTimesForC2_bj4.Compare_ihh3,
                      FLTM_B.DelayTimesForC3_bj4o.Compare_ihh3,
                      FLTM_B.DelayTimesForC4_bj4os.Compare_ihh3,
                      FLTM_ConstB.DataTypeConversion5_h,
                      FLTM_ConstB.DataTypeConversion6_m,
                      &FLTM_B.sf_FetLevelSetCT_okugq,
                      &FLTM_DW.sf_FetLevelSetCT_okugq, 1, &FLTM_DW.ClearFault);
    fltm_enum_socU = FLTM_B.sf_FetLevelSetCT_okugq.ScFlt_LV;
    Abs = (int16_T)((int16_T)soce_pct_SOC - (int16_T)FLTM_DW.Delay_DSTATE[0]);
    if (Abs < 0)
    {
        Abs = (int16_T)-Abs;
    }

    DelayTimesForC(Abs >= 1000, &FLTM_B.DelayTimesForC5_bj4,
                   &FLTM_DW.DelayTimesForC5_bj4, 5000U, 100, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    DelayTimesForC(Abs < 100, &FLTM_B.DelayTimesForC6_bj,
                   &FLTM_DW.DelayTimesForC6_bj, 5000U, 1000, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    FltLevelSettingCT(FLTM_B.DelayTimesForC5_bj4.Compare_ihh3,
                      FLTM_B.DelayTimesForC6_bj.Compare_ihh3,
                      FLTM_ConstB.DataTypeConversion3_o,
                      FLTM_ConstB.DataTypeConversion4_fx,
                      FLTM_ConstB.DataTypeConversion5_b3,
                      FLTM_ConstB.DataTypeConversion6_mr,
                      &FLTM_B.sf_FetLevelSetCT_okugqh,
                      &FLTM_DW.sf_FetLevelSetCT_okugqh, 1, &FLTM_DW.ClearFault);
    fltm_enum_socJump = FLTM_B.sf_FetLevelSetCT_okugqh.ScFlt_LV;
    for (idxDelay = 0; idxDelay < 299; idxDelay++)
    {
        FLTM_DW.Delay_DSTATE[idxDelay] = FLTM_DW.Delay_DSTATE[idxDelay + 1];
    }

    FLTM_DW.Delay_DSTATE[299] = soce_pct_SOC;
}

/* Output and update for atomic system: '<S6>/FLTM_SOH' */
void FLTM_SOH(void)
{
    DelayTimesForC(Rte_pct_SOH_GetVal() <= 800, &FLTM_B.DelayTimesForC4_bj4osu,
                   &FLTM_DW.DelayTimesForC4_bj4osu, 0U, 1000,
                   &FLTM_DW.ClearFault, &FLTM_DW.sysRunTime);
    FltLevelSettingFT(FLTM_B.DelayTimesForC4_bj4osu.Compare_ihh3,
                      FLTM_ConstB.DataTypeConversion2_p,
                      &FLTM_B.sf_FetLevelSetFT_fzicydy1cexp,
                      &FLTM_DW.sf_FetLevelSetFT_fzicydy1cexp, 1, 1,
                      &FLTM_DW.ClearFault);
    fltm_enum_sohU = FLTM_B.sf_FetLevelSetFT_fzicydy1cexp.ScFlt_LV;
}

/* Function for Chart: '<S27>/tempRise' */
static void inner_default_Step(boolean_T *FltFlg)
{
    FLTM_DW.cnt++;
    if (FLTM_B.up)
    {
        FLTM_DW.tcnt++;
        if (FLTM_DW.tcnt >= 3)
        {
            FLTM_DW.tcnt = 0U;
        }

        if (FLTM_DW.cnt > FLTM_DW.oldcnt)
        {
            FLTM_DW.uptime[FLTM_DW.tcnt] = FLTM_DW.cnt - FLTM_DW.oldcnt;
            FLTM_DW.oldcnt = FLTM_DW.cnt;
        }
        else
        {
            FLTM_DW.uptime[FLTM_DW.tcnt] = 1000U;
        }
    }

    *FltFlg = ((FLTM_DW.uptime[0] + FLTM_DW.uptime[1]) + FLTM_DW.uptime[2] <=
               350U);
}

/* Output and update for atomic system: '<S6>/FLTM_ThermRunaway' */
void FLTM_ThermRunaway(void)
{
    boolean_T FltFlg;
    DelayTimesForC(Rte_c_CellMaxTmp_GetVal() >= 95, &FLTM_B.DelayTimesForC_bj4o,
                   &FLTM_DW.DelayTimesForC_bj4o, 0U, 300, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    DelayTimesForC((uint16_T)(Rte_mv_CellMaxVol_GetVal() -
                    Rte_mv_CellMinVol_GetVal()) >= 800,
                   &FLTM_B.DelayTimesForC1_bj4osu1j,
                   &FLTM_DW.DelayTimesForC1_bj4osu1j, 0U, 300,
                   &FLTM_DW.ClearFault, &FLTM_DW.sysRunTime);
    if (FLTM_DW.is_active_c11_FLTM == 0U)
    {
        FLTM_DW.is_active_c11_FLTM = 1U;
        FLTM_DW.is_c11_FLTM = IN_Init_fg;
        FLTM_DW.cnt_o = 0U;
        FLTM_DW.OldTempMax = Rte_c_CellMaxTmp_GetVal();
    }
    else if (FLTM_DW.is_c11_FLTM == IN_Init_fg)
    {
        if (FLTM_DW.cnt_o >= 100)
        {
            FLTM_DW.is_c11_FLTM = IN_Step;
            if (Rte_c_CellMaxTmp_GetVal() > FLTM_DW.OldTempMax)
            {
                FLTM_DW.OldTempMax = Rte_c_CellMaxTmp_GetVal();
                FLTM_B.up = true;
            }
            else
            {
                FLTM_B.up = false;
                if (Rte_c_CellMaxTmp_GetVal() < FLTM_DW.OldTempMax - 1)
                {
                    FLTM_DW.OldTempMax = Rte_c_CellMaxTmp_GetVal();
                }
            }
        }
        else
        {
            FLTM_DW.cnt_o++;
            FLTM_DW.OldTempMax = Rte_c_CellMaxTmp_GetVal();
        }
    }
    else
    {
        /* case IN_Step: */
        if (Rte_c_CellMaxTmp_GetVal() > FLTM_DW.OldTempMax)
        {
            FLTM_DW.OldTempMax = Rte_c_CellMaxTmp_GetVal();
            FLTM_B.up = true;
        }
        else
        {
            FLTM_B.up = false;
            if (Rte_c_CellMaxTmp_GetVal() < FLTM_DW.OldTempMax - 1)
            {
                FLTM_DW.OldTempMax = Rte_c_CellMaxTmp_GetVal();
            }
        }
    }

    if (FLTM_DW.is_active_c45_FLTM == 0U)
    {
        FLTM_DW.is_active_c45_FLTM = 1U;
        FLTM_DW.is_c45_FLTM = IN_Init_fg;
        FLTM_DW.uptime[0] = 1000U;
        FLTM_DW.uptime[1] = 1000U;
        FLTM_DW.uptime[2] = 1000U;
        FltFlg = false;
    }
    else if (FLTM_DW.is_c45_FLTM == IN_Init_fg)
    {
        FLTM_DW.is_c45_FLTM = IN_Step;
        inner_default_Step(&FltFlg);
    }
    else
    {
        /* case IN_Step: */
        inner_default_Step(&FltFlg);
    }

    FltLevelSettingFT((FltFlg && FLTM_B.DelayTimesForC_bj4o.Compare_ihh3) ||
                      (FltFlg && FLTM_B.DelayTimesForC1_bj4osu1j.Compare_ihh3),
                      FLTM_ConstB.DataTypeConversion2_dg,
                      &FLTM_B.sf_FetLevelSetFT_fzicydy1cexps,
                      &FLTM_DW.sf_FetLevelSetFT_fzicydy1cexps, 3, 1,
                      &FLTM_DW.ClearFault);
    fltm_enum_ThermRunaway = FLTM_B.sf_FetLevelSetFT_fzicydy1cexps.ScFlt_LV;
}

/* Output and update for atomic system: '<S6>/FLTM_VCUCOM' */
void FLTM_VCUCOM(void)
{
    int_T idxDelay;
    boolean_T RelationalOperator_e;
    RelationalOperator_e = (Rte_vcan_vcuLfieCnt_GetVal() ==
                            FLTM_DW.Delay_DSTATE_k[0]);
    DelayTimesForC(RelationalOperator_e, &FLTM_B.DelayTimesForC12_bj4o,
                   &FLTM_DW.DelayTimesForC12_bj4o, 0U, 100, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    FltLevelSettingFT(FLTM_B.DelayTimesForC12_bj4o.Compare_ihh3,
                      !RelationalOperator_e,
                      &FLTM_B.sf_FetLevelSetFT_fzicydy1cexpss,
                      &FLTM_DW.sf_FetLevelSetFT_fzicydy1cexpss, 1, 1,
                      &FLTM_DW.ClearFault);
    fltm_enum_vcuComFlt = FLTM_B.sf_FetLevelSetFT_fzicydy1cexpss.ScFlt_LV;
    for (idxDelay = 0; idxDelay < 9; idxDelay++)
    {
        FLTM_DW.Delay_DSTATE_k[idxDelay] = FLTM_DW.Delay_DSTATE_k[idxDelay + 1];
    }

    FLTM_DW.Delay_DSTATE_k[9] = Rte_vcan_vcuLfieCnt_GetVal();
}

/* Output and update for atomic system: '<S6>/FLT_CELLTmp' */
void FLT_CELLTmp(void)
{
    uint8_T Subtract10_o;
    boolean_T Compare_j5;
    Subtract10_o = (uint8_T)(Rte_c_CellMaxTmp_GetVal() - Rte_c_CellMinTmp_GetVal
        ());
    Compare_j5 = !FLTM_B.LogicalOperator1_j;
    DelayTimesForC(Rte_c_CellMaxTmp_GetVal() < 93, &FLTM_B.DelayTimesForC_bj4os,
                   &FLTM_DW.DelayTimesForC_bj4os, 2000U, 1000,
                   &FLTM_DW.ClearFault, &FLTM_DW.sysRunTime);
    DelayTimesForC((Rte_c_CellMaxTmp_GetVal() >= 90) && Compare_j5,
                   &FLTM_B.DelayTimesForC1_bj4osu1j3,
                   &FLTM_DW.DelayTimesForC1_bj4osu1j3, 2000U, 1000,
                   &FLTM_DW.ClearFault, &FLTM_DW.sysRunTime);
    DelayTimesForC((Rte_c_CellMinTmp_GetVal() <= 15) && Compare_j5,
                   &FLTM_B.DelayTimesForC11_b, &FLTM_DW.DelayTimesForC11_b,
                   2000U, 1000, &FLTM_DW.ClearFault, &FLTM_DW.sysRunTime);
    DelayTimesForC(Rte_c_CellMinTmp_GetVal() > 20,
                   &FLTM_B.DelayTimesForC12_bj4os,
                   &FLTM_DW.DelayTimesForC12_bj4os, 2000U, 1000,
                   &FLTM_DW.ClearFault, &FLTM_DW.sysRunTime);
    DelayTimesForC(Rte_c_CellMaxTmp_GetVal() < 88, &FLTM_B.DelayTimesForC2_bj4o,
                   &FLTM_DW.DelayTimesForC2_bj4o, 2000U, 1000,
                   &FLTM_DW.ClearFault, &FLTM_DW.sysRunTime);
    DelayTimesForC(Subtract10_o >= 15, &FLTM_B.DelayTimesForC20_b,
                   &FLTM_DW.DelayTimesForC20_b, 2000U, 1000, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    DelayTimesForC(Subtract10_o < 12, &FLTM_B.DelayTimesForC21,
                   &FLTM_DW.DelayTimesForC21, 2000U, 1000, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    DelayTimesForC(Subtract10_o >= 18, &FLTM_B.DelayTimesForC22,
                   &FLTM_DW.DelayTimesForC22, 2000U, 500, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    DelayTimesForC(Subtract10_o < 15, &FLTM_B.DelayTimesForC23,
                   &FLTM_DW.DelayTimesForC23, 2000U, 1000, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    DelayTimesForC(Subtract10_o < 22, &FLTM_B.DelayTimesForC24,
                   &FLTM_DW.DelayTimesForC24, 2000U, 1000, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    DelayTimesForC(Subtract10_o >= 25, &FLTM_B.DelayTimesForC26,
                   &FLTM_DW.DelayTimesForC26, 2000U, 300, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    DelayTimesForC((Rte_c_CellMaxTmp_GetVal() >= 95) && Compare_j5,
                   &FLTM_B.DelayTimesForC3_bj4os, &FLTM_DW.DelayTimesForC3_bj4os,
                   2000U, 500, &FLTM_DW.ClearFault, &FLTM_DW.sysRunTime);
    FLTM_B.LogicalOperator9_j = ((Rte_c_CellMaxTmp_GetVal() >= 100) &&
        Compare_j5);
    DelayTimesForC(FLTM_B.LogicalOperator9_j, &FLTM_B.DelayTimesForC4_bj4osu1,
                   &FLTM_DW.DelayTimesForC4_bj4osu1, 2000U, 300,
                   &FLTM_DW.ClearFault, &FLTM_DW.sysRunTime);
    DelayTimesForC((Rte_c_CellMaxTmp_GetVal() >= 90) &&
                   FLTM_B.LogicalOperator1_j, &FLTM_B.DelayTimesForC5_bj4o,
                   &FLTM_DW.DelayTimesForC5_bj4o, 2000U, 1000,
                   &FLTM_DW.ClearFault, &FLTM_DW.sysRunTime);
    DelayTimesForC(Rte_c_CellMaxTmp_GetVal() < 88, &FLTM_B.DelayTimesForC6_bj4,
                   &FLTM_DW.DelayTimesForC6_bj4, 2000U, 1000,
                   &FLTM_DW.ClearFault, &FLTM_DW.sysRunTime);
    DelayTimesForC(Rte_c_CellMaxTmp_GetVal() < 90, &FLTM_B.DelayTimesForC7_bj,
                   &FLTM_DW.DelayTimesForC7_bj, 2000U, 1000, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    DelayTimesForC((Rte_c_CellMaxTmp_GetVal() >= 93) &&
                   FLTM_B.LogicalOperator1_j, &FLTM_B.DelayTimesForC8_bj,
                   &FLTM_DW.DelayTimesForC8_bj, 2000U, 500, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    FLTM_B.LogicalOperator17_i = ((Rte_c_CellMaxTmp_GetVal() >= 95) &&
        FLTM_B.LogicalOperator1_j);
    DelayTimesForC(FLTM_B.LogicalOperator17_i, &FLTM_B.DelayTimesForC9_bj,
                   &FLTM_DW.DelayTimesForC9_bj, 2000U, 300, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    FltLevelSettingCT(FLTM_B.DelayTimesForC5_bj4o.Compare_ihh3,
                      FLTM_B.DelayTimesForC6_bj4.Compare_ihh3,
                      FLTM_B.DelayTimesForC8_bj.Compare_ihh3,
                      FLTM_B.DelayTimesForC7_bj.Compare_ihh3,
                      FLTM_B.DelayTimesForC9_bj.Compare_ihh3,
                      FLTM_ConstB.DataTypeConversion6_c,
                      &FLTM_B.sf_FetLevelSetCT_okugqhj,
                      &FLTM_DW.sf_FetLevelSetCT_okugqhj, 1, &FLTM_DW.ClearFault);
    fltm_enum_cellOTChgFlt = FLTM_B.sf_FetLevelSetCT_okugqhj.ScFlt_LV;
    FltLevelSettingCT(FLTM_B.DelayTimesForC11_b.Compare_ihh3,
                      FLTM_B.DelayTimesForC12_bj4os.Compare_ihh3,
                      FLTM_ConstB.DataTypeConversion3_pq,
                      FLTM_ConstB.DataTypeConversion4_f4,
                      FLTM_ConstB.DataTypeConversion5_pw,
                      FLTM_ConstB.DataTypeConversion6_j,
                      &FLTM_B.sf_FetLevelSetCT_okugqhj0,
                      &FLTM_DW.sf_FetLevelSetCT_okugqhj0, 1, &FLTM_DW.ClearFault);
    fltm_enum_cellUTFlt = FLTM_B.sf_FetLevelSetCT_okugqhj0.ScFlt_LV;
    FltLevelSettingCT(FLTM_B.DelayTimesForC1_bj4osu1j3.Compare_ihh3,
                      FLTM_B.DelayTimesForC2_bj4o.Compare_ihh3,
                      FLTM_B.DelayTimesForC3_bj4os.Compare_ihh3,
                      FLTM_B.DelayTimesForC_bj4os.Compare_ihh3,
                      FLTM_B.DelayTimesForC4_bj4osu1.Compare_ihh3,
                      FLTM_ConstB.DataTypeConversion6_p,
                      &FLTM_B.sf_FetLevelSetCT_okugqhj0k,
                      &FLTM_DW.sf_FetLevelSetCT_okugqhj0k, 1,
                      &FLTM_DW.ClearFault);
    fltm_enum_cellOTFlt = FLTM_B.sf_FetLevelSetCT_okugqhj0k.ScFlt_LV;
    FltLevelSettingCT(FLTM_B.DelayTimesForC20_b.Compare_ihh3,
                      FLTM_B.DelayTimesForC21.Compare_ihh3,
                      FLTM_B.DelayTimesForC22.Compare_ihh3,
                      FLTM_B.DelayTimesForC23.Compare_ihh3,
                      FLTM_B.DelayTimesForC26.Compare_ihh3,
                      FLTM_B.DelayTimesForC24.Compare_ihh3,
                      &FLTM_B.sf_FetLevelSetCT_okugqhj0k1,
                      &FLTM_DW.sf_FetLevelSetCT_okugqhj0k1, 1,
                      &FLTM_DW.ClearFault);
    fltm_enum_cellDiffTmpFlt = FLTM_B.sf_FetLevelSetCT_okugqhj0k1.ScFlt_LV;
}

/* Output and update for atomic system: '<S6>/FLT_CELLVOL' */
void FLT_CELLVOL(void)
{
    uint16_T Subtract10_d;
    boolean_T Compare_lm;
    boolean_T Switch15;
    boolean_T tmp;
    Subtract10_d = (uint16_T)(Rte_mv_CellMaxVol_GetVal() -
        Rte_mv_CellMinVol_GetVal());
    Compare_lm = !FLTM_B.LogicalOperator1_j;
    FLTM_B.Compare_ngs = (Rte_mv_CellMaxVol_GetVal() >= 3700);
    if ((int16_T)(Rte_c_CellMinTmp_GetVal() - 40) > 20)
    {
        tmp = (Rte_mv_CellMinVol_GetVal() <= 2800);
    }
    else if ((int16_T)(Rte_c_CellMinTmp_GetVal() - 40) > 10)
    {
        tmp = (Rte_mv_CellMinVol_GetVal() <= 2500);
    }
    else if ((int16_T)(Rte_c_CellMinTmp_GetVal() - 40) > 0)
    {
        tmp = (Rte_mv_CellMinVol_GetVal() <= 2300);
    }
    else if ((int16_T)(Rte_c_CellMinTmp_GetVal() - 40) > -5)
    {
        tmp = (Rte_mv_CellMinVol_GetVal() <= 2200);
    }
    else
    {
        tmp = (Rte_mv_CellMinVol_GetVal() <= 2000);
    }

    DelayTimesForC(tmp && Compare_lm && (FLTM_B.Product30_p <= 140),
                   &FLTM_B.DelayTimesForC_bj4osu, &FLTM_DW.DelayTimesForC_bj4osu,
                   3000U, 1000, &FLTM_DW.ClearFault, &FLTM_DW.sysRunTime);
    if ((int16_T)(Rte_c_CellMinTmp_GetVal() - 40) > 20)
    {
        tmp = (Rte_mv_CellMinVol_GetVal() > 3100);
    }
    else if ((int16_T)(Rte_c_CellMinTmp_GetVal() - 40) > 10)
    {
        tmp = (Rte_mv_CellMinVol_GetVal() > 2900);
    }
    else if ((int16_T)(Rte_c_CellMinTmp_GetVal() - 40) > 0)
    {
        tmp = (Rte_mv_CellMinVol_GetVal() > 2600);
    }
    else if ((int16_T)(Rte_c_CellMinTmp_GetVal() - 40) > -5)
    {
        tmp = (Rte_mv_CellMinVol_GetVal() > 2400);
    }
    else
    {
        tmp = (Rte_mv_CellMinVol_GetVal() > 2200);
    }

    DelayTimesForC(tmp, &FLTM_B.DelayTimesForC1_bj4osu1j3l,
                   &FLTM_DW.DelayTimesForC1_bj4osu1j3l, 3000U, 1000,
                   &FLTM_DW.ClearFault, &FLTM_DW.sysRunTime);
    Switch15 = false;
    if (FLTM_DW.cnt_b >= 10)
    {
        FLTM_DW.cnt_b = 300U;
        Switch15 = true;
    }
    else
    {
        FLTM_DW.cnt_b++;
    }

    DelayTimesForC((Subtract10_d >= 400) && Switch15, &FLTM_B.DelayTimesForC10_b,
                   &FLTM_DW.DelayTimesForC10_b, 0U,
                   Pccfg_CellVoltDiffGrade1DetmTi, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    DelayTimesForC((Subtract10_d <= 300) && Switch15,
                   &FLTM_B.DelayTimesForC11_bj, &FLTM_DW.DelayTimesForC11_bj, 0U,
                   Pccfg_CellVoltDiffGrade1RednTi, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    DelayTimesForC((Subtract10_d >= 500) && Switch15,
                   &FLTM_B.DelayTimesForC12_bj4osu,
                   &FLTM_DW.DelayTimesForC12_bj4osu, 0U,
                   Pccfg_CellVoltDiffGrade2DetmTi, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    DelayTimesForC((Subtract10_d <= 400) && Switch15, &FLTM_B.DelayTimesForC13_b,
                   &FLTM_DW.DelayTimesForC13_b, 0U,
                   Pccfg_CellVoltDiffGrade2RednTi, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    DelayTimesForC((Subtract10_d >= 800) && Switch15, &FLTM_B.DelayTimesForC14_b,
                   &FLTM_DW.DelayTimesForC14_b, 0U,
                   Pccfg_CellVoltDiffGrade3DetmTi, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    if ((int16_T)(Rte_c_CellMinTmp_GetVal() - 40) > 20)
    {
        tmp = (Rte_mv_CellMinVol_GetVal() <= 2600);
    }
    else if ((int16_T)(Rte_c_CellMinTmp_GetVal() - 40) > 10)
    {
        tmp = (Rte_mv_CellMinVol_GetVal() <= 2350);
    }
    else if ((int16_T)(Rte_c_CellMinTmp_GetVal() - 40) > 0)
    {
        tmp = (Rte_mv_CellMinVol_GetVal() <= 2100);
    }
    else if ((int16_T)(Rte_c_CellMinTmp_GetVal() - 40) > -5)
    {
        tmp = (Rte_mv_CellMinVol_GetVal() <= 2000);
    }
    else
    {
        tmp = (Rte_mv_CellMinVol_GetVal() <= 1800);
    }

    DelayTimesForC(tmp && Compare_lm, &FLTM_B.DelayTimesForC2_bj4os,
                   &FLTM_DW.DelayTimesForC2_bj4os, 3000U, 500,
                   &FLTM_DW.ClearFault, &FLTM_DW.sysRunTime);
    if ((int16_T)(Rte_c_CellMinTmp_GetVal() - 40) > 20)
    {
        tmp = (Rte_mv_CellMinVol_GetVal() > 2900);
    }
    else if ((int16_T)(Rte_c_CellMinTmp_GetVal() - 40) > 10)
    {
        tmp = (Rte_mv_CellMinVol_GetVal() > 2700);
    }
    else if ((int16_T)(Rte_c_CellMinTmp_GetVal() - 40) > 0)
    {
        tmp = (Rte_mv_CellMinVol_GetVal() > 2400);
    }
    else if ((int16_T)(Rte_c_CellMinTmp_GetVal() - 40) > -5)
    {
        tmp = (Rte_mv_CellMinVol_GetVal() > 2200);
    }
    else
    {
        tmp = (Rte_mv_CellMinVol_GetVal() > 2000);
    }

    DelayTimesForC(tmp, &FLTM_B.DelayTimesForC3_bj4osu,
                   &FLTM_DW.DelayTimesForC3_bj4osu, 3000U, 1000,
                   &FLTM_DW.ClearFault, &FLTM_DW.sysRunTime);
    if ((int16_T)(Rte_c_CellMinTmp_GetVal() - 40) > 20)
    {
        tmp = (Rte_mv_CellMinVol_GetVal() <= 2400);
    }
    else if ((int16_T)(Rte_c_CellMinTmp_GetVal() - 40) > 10)
    {
        tmp = (Rte_mv_CellMinVol_GetVal() <= 2200);
    }
    else if ((int16_T)(Rte_c_CellMinTmp_GetVal() - 40) > 0)
    {
        tmp = (Rte_mv_CellMinVol_GetVal() <= 1900);
    }
    else if ((int16_T)(Rte_c_CellMinTmp_GetVal() - 40) > -5)
    {
        tmp = (Rte_mv_CellMinVol_GetVal() <= 1800);
    }
    else
    {
        tmp = (Rte_mv_CellMinVol_GetVal() <= 1600);
    }

    DelayTimesForC(tmp && Compare_lm, &FLTM_B.DelayTimesForC4_bj4osu1j,
                   &FLTM_DW.DelayTimesForC4_bj4osu1j, 3000U, 300,
                   &FLTM_DW.ClearFault, &FLTM_DW.sysRunTime);
    DelayTimesForC(Rte_mv_CellMaxVol_GetVal() <= 3700,
                   &FLTM_B.DelayTimesForC5_bj4os, &FLTM_DW.DelayTimesForC5_bj4os,
                   0U, 1000, &FLTM_DW.ClearFault, &FLTM_DW.sysRunTime);
    DelayTimesForC(FLTM_B.Compare_ngs, &FLTM_B.DelayTimesForC6_bj4o,
                   &FLTM_DW.DelayTimesForC6_bj4o, 0U, 500, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    DelayTimesForC(Rte_mv_CellMaxVol_GetVal() <= 3620,
                   &FLTM_B.DelayTimesForC7_bj4, &FLTM_DW.DelayTimesForC7_bj4, 0U,
                   1000, &FLTM_DW.ClearFault, &FLTM_DW.sysRunTime);
    DelayTimesForC(Rte_mv_CellMaxVol_GetVal() >= 3750,
                   &FLTM_B.DelayTimesForC8_bj4, &FLTM_DW.DelayTimesForC8_bj4, 0U,
                   300, &FLTM_DW.ClearFault, &FLTM_DW.sysRunTime);
    DelayTimesForC((Subtract10_d <= 650) && Switch15,
                   &FLTM_B.DelayTimesForC9_bj4, &FLTM_DW.DelayTimesForC9_bj4, 0U,
                   Pccfg_CellVoltDiffGrade3RednTi, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    FltLevelSettingCT(FLTM_B.DelayTimesForC10_b.Compare_ihh3,
                      FLTM_B.DelayTimesForC11_bj.Compare_ihh3,
                      FLTM_B.DelayTimesForC12_bj4osu.Compare_ihh3,
                      FLTM_B.DelayTimesForC13_b.Compare_ihh3,
                      FLTM_B.DelayTimesForC14_b.Compare_ihh3,
                      FLTM_B.DelayTimesForC9_bj4.Compare_ihh3,
                      &FLTM_B.sf_FetLevelSetCT_okugqhj0k1o,
                      &FLTM_DW.sf_FetLevelSetCT_okugqhj0k1o, 1,
                      &FLTM_DW.ClearFault);
    fltm_enum_cellDiffVolFlt = FLTM_B.sf_FetLevelSetCT_okugqhj0k1o.ScFlt_LV;
    FltLevelSettingCT(FLTM_B.DelayTimesForC_bj4osu.Compare_ihh3,
                      FLTM_B.DelayTimesForC1_bj4osu1j3l.Compare_ihh3,
                      FLTM_B.DelayTimesForC2_bj4os.Compare_ihh3,
                      FLTM_B.DelayTimesForC3_bj4osu.Compare_ihh3,
                      FLTM_B.DelayTimesForC4_bj4osu1j.Compare_ihh3,
                      FLTM_ConstB.DataTypeConversion6_g,
                      &FLTM_B.sf_FetLevelSetCT_okugqhj0k1oh,
                      &FLTM_DW.sf_FetLevelSetCT_okugqhj0k1oh, 1,
                      &FLTM_DW.ClearFault);
    fltm_enum_cellUVFlt = FLTM_B.sf_FetLevelSetCT_okugqhj0k1oh.ScFlt_LV;
    FltLevelSettingCT(FLTM_ConstB.DataTypeConversion_b,
                      FLTM_ConstB.DataTypeConversion2_edi,
                      FLTM_B.DelayTimesForC6_bj4o.Compare_ihh3,
                      FLTM_B.DelayTimesForC7_bj4.Compare_ihh3,
                      FLTM_B.DelayTimesForC8_bj4.Compare_ihh3,
                      FLTM_B.DelayTimesForC5_bj4os.Compare_ihh3,
                      &FLTM_B.sf_FetLevelSetCT_okugqhj0k1ohg,
                      &FLTM_DW.sf_FetLevelSetCT_okugqhj0k1ohg, 1,
                      &FLTM_DW.ClearFault);
    fltm_enum_cellOVFlt = FLTM_B.sf_FetLevelSetCT_okugqhj0k1ohg.ScFlt_LV;
}

/* Output and update for atomic system: '<S6>/FLT_PACK' */
void FLT_PACK(void)
{
    uint16_T Product30;
    boolean_T LogicalOperator1_f;
    boolean_T tmp;
    Product30 = (uint16_T)((Rte_mv_PackVolt_GetVal() + 5U) / 10U);
    LogicalOperator1_f = (FLTM_B.Delay2 == 0);
    DelayTimesForC((Product30 >= 13690) && LogicalOperator1_f &&
                   FLTM_B.LogicalOperator1_j, &FLTM_B.DelayTimesForC_bj4osu1,
                   &FLTM_DW.DelayTimesForC_bj4osu1, 0U, 500, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    FLTM_B.LogicalOperator2_m = ((Product30 >= 13875) && LogicalOperator1_f &&
        FLTM_B.LogicalOperator1_j);
    DelayTimesForC(FLTM_B.LogicalOperator2_m,
                   &FLTM_B.DelayTimesForC1_bj4osu1j3lw,
                   &FLTM_DW.DelayTimesForC1_bj4osu1j3lw, 0U, 300,
                   &FLTM_DW.ClearFault, &FLTM_DW.sysRunTime);
    LogicalOperator1_f = (LogicalOperator1_f && (!FLTM_B.LogicalOperator1_j));
    if ((int16_T)(Rte_c_CellMinTmp_GetVal() - 40) > 20)
    {
        tmp = (Product30 <= 8880);
    }
    else if ((int16_T)(Rte_c_CellMinTmp_GetVal() - 40) > 10)
    {
        tmp = (Product30 <= 8170);
    }
    else if ((int16_T)(Rte_c_CellMinTmp_GetVal() - 40) > 0)
    {
        tmp = (Product30 <= 7030);
    }
    else if ((int16_T)(Rte_c_CellMinTmp_GetVal() - 40) > -5)
    {
        tmp = (Product30 <= 6660);
    }
    else
    {
        tmp = (Product30 <= 5920);
    }

    FLTM_B.LogicalOperator3_a3 = (tmp && LogicalOperator1_f);
    DelayTimesForC(FLTM_B.LogicalOperator3_a3, &FLTM_B.DelayTimesForC10_bj,
                   &FLTM_DW.DelayTimesForC10_bj, 3000U,
                   Pccfg_PackVoltUnderGrade3DetmTi, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    DelayTimesForC(Product30 < 13394, &FLTM_B.DelayTimesForC2_bj4osu,
                   &FLTM_DW.DelayTimesForC2_bj4osu, 0U, 1000,
                   &FLTM_DW.ClearFault, &FLTM_DW.sysRunTime);
    DelayTimesForC(Product30 < 13690, &FLTM_B.DelayTimesForC3_bj4osu1,
                   &FLTM_DW.DelayTimesForC3_bj4osu1, 0U, 1000,
                   &FLTM_DW.ClearFault, &FLTM_DW.sysRunTime);
    if ((int16_T)(Rte_c_CellMinTmp_GetVal() - 40) > 20)
    {
        tmp = (Product30 <= 10360);
    }
    else if ((int16_T)(Rte_c_CellMinTmp_GetVal() - 40) > 10)
    {
        tmp = (Product30 <= 9250);
    }
    else if ((int16_T)(Rte_c_CellMinTmp_GetVal() - 40) > 0)
    {
        tmp = (Product30 <= 8510);
    }
    else if ((int16_T)(Rte_c_CellMinTmp_GetVal() - 40) > -5)
    {
        tmp = (Product30 <= 8140);
    }
    else
    {
        tmp = (Product30 <= 7400);
    }

    DelayTimesForC(tmp && LogicalOperator1_f && (FLTM_B.Product30_p <= 140),
                   &FLTM_B.DelayTimesForC6_bj4os, &FLTM_DW.DelayTimesForC6_bj4os,
                   3000U, Pccfg_PackVoltUnderGrade1DetmTi, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    if ((int16_T)(Rte_c_CellMinTmp_GetVal() - 40) > 20)
    {
        tmp = (Product30 > 11470);
    }
    else if ((int16_T)(Rte_c_CellMinTmp_GetVal() - 40) > 10)
    {
        tmp = (Product30 > 10730);
    }
    else if ((int16_T)(Rte_c_CellMinTmp_GetVal() - 40) > 0)
    {
        tmp = (Product30 > 9620);
    }
    else if ((int16_T)(Rte_c_CellMinTmp_GetVal() - 40) > -5)
    {
        tmp = (Product30 > 8880);
    }
    else
    {
        tmp = (Product30 > 8140);
    }

    DelayTimesForC(tmp, &FLTM_B.DelayTimesForC7_bj4o,
                   &FLTM_DW.DelayTimesForC7_bj4o, 3000U,
                   Pccfg_PackVoltUnderGrade1DetmTi, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    if ((int16_T)(Rte_c_CellMinTmp_GetVal() - 40) > 20)
    {
        tmp = (Product30 <= 9620);
    }
    else if ((int16_T)(Rte_c_CellMinTmp_GetVal() - 40) > 10)
    {
        tmp = (Product30 <= 8695);
    }
    else if ((int16_T)(Rte_c_CellMinTmp_GetVal() - 40) > 0)
    {
        tmp = (Product30 <= 7770);
    }
    else if ((int16_T)(Rte_c_CellMinTmp_GetVal() - 40) > -5)
    {
        tmp = (Product30 <= 7400);
    }
    else
    {
        tmp = (Product30 <= 6660);
    }

    DelayTimesForC(tmp && LogicalOperator1_f, &FLTM_B.DelayTimesForC8_bj4o,
                   &FLTM_DW.DelayTimesForC8_bj4o, 3000U,
                   Pccfg_PackVoltUnderGrade2DetmTi, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    if ((int16_T)(Rte_c_CellMinTmp_GetVal() - 40) > 20)
    {
        tmp = (Product30 > 10730);
    }
    else if ((int16_T)(Rte_c_CellMinTmp_GetVal() - 40) > 10)
    {
        tmp = (Product30 > 9990);
    }
    else if ((int16_T)(Rte_c_CellMinTmp_GetVal() - 40) > 0)
    {
        tmp = (Product30 > 8880);
    }
    else if ((int16_T)(Rte_c_CellMinTmp_GetVal() - 40) > -5)
    {
        tmp = (Product30 > 8140);
    }
    else
    {
        tmp = (Product30 > 7400);
    }

    DelayTimesForC(tmp, &FLTM_B.DelayTimesForC9_bj4o,
                   &FLTM_DW.DelayTimesForC9_bj4o, 3000U,
                   Pccfg_PackVoltUnderGrade1DetmTi, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    FltLevelSettingCT(FLTM_ConstB.DataTypeConversion_g1,
                      FLTM_ConstB.DataTypeConversion2_ok,
                      FLTM_B.DelayTimesForC_bj4osu1.Compare_ihh3,
                      FLTM_B.DelayTimesForC2_bj4osu.Compare_ihh3,
                      FLTM_B.DelayTimesForC1_bj4osu1j3lw.Compare_ihh3,
                      FLTM_B.DelayTimesForC3_bj4osu1.Compare_ihh3,
                      &FLTM_B.sf_FetLevelSetCT_okugqhj0k1ohgb,
                      &FLTM_DW.sf_FetLevelSetCT_okugqhj0k1ohgb, 1,
                      &FLTM_DW.ClearFault);
    fltm_enum_packOVFlt = FLTM_B.sf_FetLevelSetCT_okugqhj0k1ohgb.ScFlt_LV;
    FltLevelSettingCT(FLTM_B.DelayTimesForC6_bj4os.Compare_ihh3,
                      FLTM_B.DelayTimesForC7_bj4o.Compare_ihh3,
                      FLTM_B.DelayTimesForC8_bj4o.Compare_ihh3,
                      FLTM_B.DelayTimesForC9_bj4o.Compare_ihh3,
                      FLTM_B.DelayTimesForC10_bj.Compare_ihh3,
                      FLTM_ConstB.DataTypeConversion6_e,
                      &FLTM_B.sf_FetLevelSetC_okugqhj0k1ohgbi,
                      &FLTM_DW.sf_FetLevelSetC_okugqhj0k1ohgbi, 1,
                      &FLTM_DW.ClearFault);
    fltm_enum_packUVFlt = FLTM_B.sf_FetLevelSetC_okugqhj0k1ohgbi.ScFlt_LV;
}

/* Output and update for atomic system: '<S6>/FltLevelDeal2' */
void FltLevelDeal2(void)
{
    if (FLTM_DW.is_active_c18_FLTM == 0U)
    {
        FLTM_DW.is_active_c18_FLTM = 1U;
        FLTM_DW.is_c18_FLTM = IN_Init_k;
        FLTM_DW.cnt_j = 0U;
        fltm_enum_SelfChkSts = 0U;
    }
    else
    {
        switch (FLTM_DW.is_c18_FLTM)
        {
          case IN_FltValDeal1:
            fltm_enum_SelfChkSts = 2U;
            break;

          case IN_FltValDeal2:
            fltm_enum_SelfChkSts = 1U;
            break;

          default:
            /* case IN_Init: */
            fltm_enum_SelfChkSts = 0U;
            if (fltm_flg_DsgPwrDownFlt && (FLTM_DW.cnt_j > 500))
            {
                FLTM_DW.is_c18_FLTM = IN_FltValDeal1;
                fltm_enum_SelfChkSts = 2U;
            }
            else if ((FLTM_DW.cnt_j >= 50) && (fltm_enum_adhChkSts == 1) &&
                     FLTM_B.DelayTimesForC3.Compare_ihh3 &&
                     (!FLTM_B.LogicalOperator1_j))
            {
                FLTM_DW.is_c18_FLTM = IN_FltValDeal2;
                fltm_enum_SelfChkSts = 1U;
            }
            else
            {
                FLTM_DW.cnt_j++;
            }
            break;
        }
    }
}

/* Output and update for atomic system: '<S37>/MaiRlyAdh' */
void MaiRlyAdh(void)
{
    int32_T tmp;
    if (FLTM_DW.is_active_c3_FLTM == 0U)
    {
        FLTM_DW.is_active_c3_FLTM = 1U;
        FLTM_DW.is_c3_FLTM = IN_RlyInit;
        FLTM_DW.cnt2_h = 0U;
        FLTM_DW.cnt1_c = 0U;
        FLTM_B.RlyAdFlt_m = false;
        FLTM_B.adhChkSts = 0U;
    }
    else
    {
        switch (FLTM_DW.is_c3_FLTM)
        {
          case IN_RlyAdhCheck:
            if ((((FLTM_B.Product30_g <= 50) || (!FLTM_B.LogicalOperator1_j)) &&
                 (!FLTM_B.RlyAdFlt_m)) || FLTM_DW.ClearFault)
            {
                FLTM_DW.is_c3_FLTM = IN_RlyInit;
                FLTM_DW.cnt2_h = 0U;
                FLTM_DW.cnt1_c = 0U;
                FLTM_B.RlyAdFlt_m = false;
                FLTM_B.adhChkSts = 0U;
            }
            else
            {
                if (FLTM_B.Product30_g * 95 <= FLTM_B.Product30_p * 100)
                {
                    tmp = FLTM_DW.cnt2_h + 1;
                    if (FLTM_DW.cnt2_h + 1 > 65535)
                    {
                        tmp = 65535;
                    }

                    FLTM_DW.cnt2_h = (uint16_T)tmp;
                    FLTM_DW.cnt1_c = 0U;
                }
                else
                {
                    tmp = FLTM_DW.cnt1_c + 1;
                    if (FLTM_DW.cnt1_c + 1 > 65535)
                    {
                        tmp = 65535;
                    }

                    FLTM_DW.cnt1_c = (uint16_T)tmp;
                }

                if ((FLTM_DW.cnt2_h > 500) && (FLTM_B.adhChkSts == 0))
                {
                    FLTM_B.RlyAdFlt_m = true;
                    FLTM_B.adhChkSts = 1U;
                }

                if (FLTM_DW.cnt1_c >= 10)
                {
                    FLTM_B.RlyAdFlt_m = false;
                    FLTM_B.adhChkSts = 1U;
                }
            }
            break;

          case IN_RlyAdhCheck1:
            if ((((FLTM_B.Product30_g <= 50) || (!FLTM_B.Compare_na)) &&
                    (!FLTM_B.RlyAdFlt_m)) || FLTM_DW.ClearFault)
            {
                FLTM_DW.is_c3_FLTM = IN_RlyInit;
                FLTM_DW.cnt2_h = 0U;
                FLTM_DW.cnt1_c = 0U;
                FLTM_B.RlyAdFlt_m = false;
                FLTM_B.adhChkSts = 0U;
            }
            else
            {
                if (FLTM_B.Product30_g * 95 <= FLTM_B.Product30_p * 100)
                {
                    tmp = FLTM_DW.cnt2_h + 1;
                    if (FLTM_DW.cnt2_h + 1 > 65535)
                    {
                        tmp = 65535;
                    }

                    FLTM_DW.cnt2_h = (uint16_T)tmp;
                    FLTM_DW.cnt1_c = 0U;
                }
                else
                {
                    tmp = FLTM_DW.cnt1_c + 1;
                    if (FLTM_DW.cnt1_c + 1 > 65535)
                    {
                        tmp = 65535;
                    }

                    FLTM_DW.cnt1_c = (uint16_T)tmp;
                }

                if ((FLTM_DW.cnt2_h > 500) && (FLTM_B.adhChkSts == 0))
                {
                    FLTM_B.RlyAdFlt_m = true;
                    FLTM_B.adhChkSts = 1U;
                }

                if (FLTM_DW.cnt1_c >= 10)
                {
                    FLTM_B.RlyAdFlt_m = false;
                    FLTM_B.adhChkSts = 1U;
                }
            }
            break;

          default:
            /* case IN_RlyInit: */
            if ((FLTM_B.Product30_g > 50) && FLTM_B.LogicalOperator1_j)
            {
                FLTM_DW.is_c3_FLTM = IN_RlyAdhCheck;
                if (FLTM_B.Product30_g * 95 <= FLTM_B.Product30_p * 100)
                {
                    tmp = FLTM_DW.cnt2_h + 1;
                    if (FLTM_DW.cnt2_h + 1 > 65535)
                    {
                        tmp = 65535;
                    }

                    FLTM_DW.cnt2_h = (uint16_T)tmp;
                    FLTM_DW.cnt1_c = 0U;
                }
                else
                {
                    tmp = FLTM_DW.cnt1_c + 1;
                    if (FLTM_DW.cnt1_c + 1 > 65535)
                    {
                        tmp = 65535;
                    }

                    FLTM_DW.cnt1_c = (uint16_T)tmp;
                }

                if ((FLTM_DW.cnt2_h > 500) && (FLTM_B.adhChkSts == 0))
                {
                    FLTM_B.RlyAdFlt_m = true;
                    FLTM_B.adhChkSts = 1U;
                }

                if (FLTM_DW.cnt1_c >= 10)
                {
                    FLTM_B.RlyAdFlt_m = false;
                    FLTM_B.adhChkSts = 1U;
                }
            }
            else
            {
                if ((FLTM_B.Product30_g > 50) && FLTM_B.Compare_na)
                {
                    FLTM_DW.is_c3_FLTM = IN_RlyAdhCheck1;
                    if (FLTM_B.Product30_g * 95 <= FLTM_B.Product30_p * 100)
                    {
                        tmp = FLTM_DW.cnt2_h + 1;
                        if (FLTM_DW.cnt2_h + 1 > 65535)
                        {
                            tmp = 65535;
                        }

                        FLTM_DW.cnt2_h = (uint16_T)tmp;
                        FLTM_DW.cnt1_c = 0U;
                    }
                    else
                    {
                        tmp = FLTM_DW.cnt1_c + 1;
                        if (FLTM_DW.cnt1_c + 1 > 65535)
                        {
                            tmp = 65535;
                        }

                        FLTM_DW.cnt1_c = (uint16_T)tmp;
                    }

                    if ((FLTM_DW.cnt2_h > 500) && (FLTM_B.adhChkSts == 0))
                    {
                        FLTM_B.RlyAdFlt_m = true;
                        FLTM_B.adhChkSts = 1U;
                    }

                    if (FLTM_DW.cnt1_c >= 10)
                    {
                        FLTM_B.RlyAdFlt_m = false;
                        FLTM_B.adhChkSts = 1U;
                    }
                }
            }
            break;
        }
    }
}

/* Output and update for atomic system: '<S37>/PtcRlyAdh' */
void PtcRlyAdh(void)
{
    int32_T tmp;
    if (FLTM_DW.is_active_c10_FLTM == 0U)
    {
        FLTM_DW.is_active_c10_FLTM = 1U;
        FLTM_DW.is_c10_FLTM = IN_RlyInit_i;
        FLTM_DW.cnt1 = 0U;
        FLTM_DW.cnt2 = 0U;
        FLTM_B.RlyAdFlt = 0U;
    }
    else if (FLTM_DW.is_c10_FLTM == IN_RlyAdhCheck_b)
    {
        if (FLTM_DW.ClearFault && (FLTM_B.RlyAdFlt == 1))
        {
            FLTM_DW.adhChkSts = 0U;
            FLTM_DW.is_c10_FLTM = IN_RlyInit_i;
            FLTM_DW.cnt1 = 0U;
            FLTM_DW.cnt2 = 0U;
            FLTM_B.RlyAdFlt = 0U;
        }
        else
        {
            if ((FLTM_B.Product30_g * 95 <= FLTM_B.Product30_p * 100) &&
                    (FLTM_DW.adhChkSts == 0))
            {
                tmp = FLTM_DW.cnt2 + 1;
                if (FLTM_DW.cnt2 + 1 > 65535)
                {
                    tmp = 65535;
                }

                FLTM_DW.cnt2 = (uint16_T)tmp;
                FLTM_DW.cnt1 = 0U;
            }
            else
            {
                tmp = FLTM_DW.cnt1 + 1;
                if (FLTM_DW.cnt1 + 1 > 65535)
                {
                    tmp = 65535;
                }

                FLTM_DW.cnt1 = (uint16_T)tmp;
            }

            if ((FLTM_DW.cnt2 > 100) && (FLTM_DW.adhChkSts == 0))
            {
                FLTM_B.RlyAdFlt = 1U;
                FLTM_DW.adhChkSts = 1U;
            }

            if ((FLTM_DW.cnt1 >= 10) && (FLTM_DW.adhChkSts == 0))
            {
                FLTM_B.RlyAdFlt = 0U;
                FLTM_DW.adhChkSts = 1U;
            }
        }
    }
    else
    {
        /* case IN_RlyInit: */
        if ((FLTM_B.Product30_g > 50) && FLTM_B.LogicalOperator1_j)
        {
            FLTM_DW.is_c10_FLTM = IN_RlyAdhCheck_b;
            if ((FLTM_B.Product30_g * 95 <= FLTM_B.Product30_p * 100) &&
                    (FLTM_DW.adhChkSts == 0))
            {
                tmp = FLTM_DW.cnt2 + 1;
                if (FLTM_DW.cnt2 + 1 > 65535)
                {
                    tmp = 65535;
                }

                FLTM_DW.cnt2 = (uint16_T)tmp;
                FLTM_DW.cnt1 = 0U;
            }
            else
            {
                tmp = FLTM_DW.cnt1 + 1;
                if (FLTM_DW.cnt1 + 1 > 65535)
                {
                    tmp = 65535;
                }

                FLTM_DW.cnt1 = (uint16_T)tmp;
            }

            if ((FLTM_DW.cnt2 > 100) && (FLTM_DW.adhChkSts == 0))
            {
                FLTM_B.RlyAdFlt = 1U;
                FLTM_DW.adhChkSts = 1U;
            }

            if ((FLTM_DW.cnt1 >= 10) && (FLTM_DW.adhChkSts == 0))
            {
                FLTM_B.RlyAdFlt = 0U;
                FLTM_DW.adhChkSts = 1U;
            }
        }
    }
}

/* Model step function */
void TASK_FLTMSignal(void)
{
    int32_T tmp;
    int16_T u0;

    /*
     * Block description for '<S2>/ipd_10ms':
     *  Platform____:FLTM
     *  Function____:ipd_100ms
     *  Description_:100ms Periodic Task
     *  Parameter___:none
     *  Return______:none
     *  Version_____:1.0
     */
    FLTM_DW.ClearFault = rte_flg_ACC_ClearFault_GetVal();
    FLTM_DW.sysRunTime = rte_ms_sysRunTime_GetVal();
    u0 = (int16_T)((int16_T)((Rte_ma_BatCurr_GetVal() + 500U) / 1000U) - 1000);
    if (u0 > 1000)
    {
        FLTM_B.Saturation1 = 1000;
    }
    else if (u0 < -1000)
    {
        FLTM_B.Saturation1 = -1000;
    }
    else
    {
        FLTM_B.Saturation1 = u0;
    }

    if (FLTM_B.Saturation1 < 0)
    {
        tmp = -FLTM_B.Saturation1;
        if (-FLTM_B.Saturation1 > 32767)
        {
            tmp = 32767;
        }

        FLTM_B.Product30_p = (uint16_T)tmp;
    }
    else
    {
        FLTM_B.Product30_p = (uint16_T)FLTM_B.Saturation1;
    }

    FLTM_B.Delay2 = FLTM_DW.Delay2_DSTATE;
    DelayTimesForC(!Rte_flg_SmpChipSpiFlt_GetVal(), &FLTM_B.DelayTimesForC3,
                   &FLTM_DW.DelayTimesForC3, 0U, 20, &FLTM_DW.ClearFault,
                   &FLTM_DW.sysRunTime);
    FLTM_BMSHwCircuit();
    FLTM_B.LogicalOperator1_j = ((vewm_enum_workingMode == ((uint8_T)
        Pdcfg_WmSChging)) || (vewm_enum_workingMode == ((uint8_T)Pdcfg_WmQChging))
        || Rte_flg_SChgIgSts_GetVal());
    FLTM_BMUTMPSP1();
    FLTM_SMP();
    FLTM_CURR();
    FLTM_HVIL();
    FLTM_B.Product30_g = (uint16_T)((Rte_mv_PackVolt_GetVal() + 500U) / 1000U);
    FLTM_INSU();
    FLTM_OBCCOM();
    FLTM_PTCHeatInvalid();
    FLTM_SOC();
    FLTM_ThermRunaway();
    FLT_CELLTmp();
    FLT_CELLVOL();
    FLT_PACK();
    FLTM_B.Product30_p = (uint16_T)((Rte_mv_LPVol_GetVal() + 500U) / 1000U);
    FLTM_B.LogicalOperator1_j = ((vewm_enum_DisSts == 1) && (!vewm_flg_posRlyCtr)
        && (!vewm_flg_prechgRlyCtr));
    FLTM_B.Compare_na = (FLTM_DW.Delay_DSTATE_e == 0);
    MaiRlyAdh();
    fltm_enum_adhChkSts = FLTM_B.adhChkSts;
    FLTM_B.LogicalOperator1_j = (FLTM_B.LogicalOperator2_m ||
        FLTM_B.LogicalOperator3_a3 || FLTM_B.Compare_ngs ||
        FLTM_B.DelayTimesForC4_bj4osu1j.Compare_ihh3 ||
        FLTM_B.LogicalOperator9_j || FLTM_B.LogicalOperator17_i ||
        fltm_flg_hvilFlt);
    FltLevelDeal2();
    FLTM_B.Product30_p = (uint16_T)((Rte_mv_PtcVol_GetVal() + 500U) / 1000U);
    fltm_enum_PackVolSmpFlt = 0U;
    fltm_enum_cellUTChgFlt = 0U;
    fltm_enum_chgNegRlyAd = 0U;
    fltm_enum_chgPosRlyAd = 0U;
    fltm_enum_negRlyAd = 0U;
    fltm_enum_socO = 0U;
    FltLevelSettingFT(FLTM_B.RlyAdFlt_m, FLTM_ConstB.DataTypeConversion2_ao,
                      &FLTM_B.sf_FetLevelSetFT, &FLTM_DW.sf_FetLevelSetFT, 3, 1,
                      &FLTM_DW.ClearFault);
    fltm_enum_posRlyAd = FLTM_B.sf_FetLevelSetFT.ScFlt_LV;
    FLTM_B.LogicalOperator1_j = ((!tmsc_flg_PTCRlyCtr) && vewm_flg_posRlyCtr);
    PtcRlyAdh();
    FltLevelSettingFT(FLTM_B.RlyAdFlt != 0, FLTM_ConstB.DataTypeConversion2_d,
                      &FLTM_B.sf_FetLevelSetFT_f, &FLTM_DW.sf_FetLevelSetFT_f, 3,
                      1, &FLTM_DW.ClearFault);
    fltm_enum_ptcAdFlt = FLTM_B.sf_FetLevelSetFT_f.ScFlt_LV;
    FltLevelSettingFT(FLTM_ConstB.DataTypeConversion_ch,
                      FLTM_ConstB.DataTypeConversion2_ed,
                      &FLTM_B.sf_FetLevelSetFT_fz, &FLTM_DW.sf_FetLevelSetFT_fz,
                      3, 1, &FLTM_DW.ClearFault);
    fltm_enum_preRlyAd = FLTM_B.sf_FetLevelSetFT_fz.ScFlt_LV;
    FLTM_12VErr();
    fltm_enum_v12UL = 0U;
    fltm_enum_FastChgProtectSts = 0U;
    FLTM_VCUCOM();
    fltm_enum_qchgComFlt = 0U;
    fltm_enum_qchgRlyOp = 0U;
    fltm_enum_posRlyOp = 0U;
    fltm_enum_negRlyOp = 0U;
    fltm_enum_PTCRlyOp = 0U;
    fltm_enum_SmpChipSpiChk = 0U;
    fltm_enum_bmuComFlt = 0U;
    fltm_enum_CellTmpRiseFastFlt = FLTM_ConstB.Constant17;
    FLTM_SOH();
    FLTM_CANBUSOFF();
    FLTM_PreFail();
    fltm_enum_InsCircuitChk = 0U;
    fltm_enum_CellVoltLimUV = 0U;
    fltm_enum_ChargerReadyOverTime = 0U;
    fltm_enum_posRlyPwrDownAd = FLTM_ConstB.Constant6;
    fltm_enum_packFuseFlt = 0U;
    fltm_enum_schgccFlt = 0U;
    fltm_enum_posRlyhighVolSmpAbnl = 0U;
    fltm_enum_schgcpFlt = 0U;

    /*
     * Block description for '<S6>/Function Caller':
     *  FltCodeFig.h
     */
    TASK_FaultCode();
    FLTM_DW.Delay_DSTATE_e = fltm_enum_SelfChkSts;
    FLTM_DW.Delay2_DSTATE = 0U;
}

/* Model initialize function */
void FLTM_initialize(void)
{
    /*
     * Block description for '<S2>/ipd_10ms':
     *  Platform____:FLTM
     *  Function____:ipd_100ms
     *  Description_:100ms Periodic Task
     *  Parameter___:none
     *  Return______:none
     *  Version_____:1.0
     */
    fltm_enum_CellTmpRiseFastFlt = FLTM_ConstB.Constant17;
    fltm_enum_posRlyPwrDownAd = FLTM_ConstB.Constant6;
}

/*
 * File trailer for generated code.
 *
 * [EOF]
 */
